<?php

namespace addons\member\model;


class MemberFrozen extends \web\common\model\BaseModel {

    protected function _initialize() {
        $this->tableName = 'member_frozen';
    }


    /**
     * 添加冻结数量
     */
    public function addFrozen($user_id,$amount,$type,$lock_amount,$money){
        $data = [
            'user_id'=>$user_id,
            'amount'=>$amount,
            'frozen_amount'=>$amount,
            'release_num'=>0,
            'release_amount'=>0,
            'type'=>$type,
            'lock_amount'=>$lock_amount,
            'money'=>$money,
            'create_time'=>NOW_DATETIME,
            'update_time'=>NOW_DATETIME,
        ];
        return $this->add($data);
    }
    
}
